/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #f5f7fa;
}

/* 默认主题 */
:root {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  --text-color-primary: #303133;
  --text-color-regular: #606266;
  --text-color-secondary: #909399;
  --text-color-placeholder: #c0c4cc;
  --border-color-base: #dcdfe6;
  --border-color-light: #e4e7ed;
  --border-color-lighter: #ebeef5;
  --border-color-extra-light: #f2f6fc;
  --background-color-base: #f5f7fa;
}

/* 深色主题 */
body.dark-theme {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  --text-color-primary: #ffffff;
  --text-color-regular: #e6e6e6;
  --text-color-secondary: #c0c0c0;
  --text-color-placeholder: #a0a0a0;
  --border-color-base: #4c4c4c;
  --border-color-light: #404040;
  --border-color-lighter: #333333;
  --border-color-extra-light: #222222;
  --background-color-base: #1a1a1a;
  background-color: #1a1a1a;
  color: var(--text-color-regular);
}

/* 浅色主题 */
body.light-theme {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  --text-color-primary: #303133;
  --text-color-regular: #606266;
  --text-color-secondary: #909399;
  --text-color-placeholder: #c0c4cc;
  --border-color-base: #dcdfe6;
  --border-color-light: #e4e7ed;
  --border-color-lighter: #ebeef5;
  --border-color-extra-light: #f2f6fc;
  --background-color-base: #ffffff;
  background-color: #ffffff;
  color: var(--text-color-regular);
}

/* 菜单主题样式 */
/* 默认菜单主题 (深蓝) */
.sidebar-container {
  background-color: #304156;
}

.sidebar-container .logo-container {
  background-color: #2c3e50;
}

/* 深色菜单主题 */
.sidebar-container.menu-theme-dark {
  background-color: #1f1f1f;
}

.sidebar-container.menu-theme-dark .logo-container {
  background-color: #111;
}

.sidebar-container.menu-theme-dark .el-menu {
  background-color: #1f1f1f;
  border-right-color: #4c4c4c;
}

.sidebar-container.menu-theme-dark .el-menu-item {
  background-color: #1f1f1f;
  color: #e6e6e6;
}

.sidebar-container.menu-theme-dark .el-menu-item:hover {
  background-color: #333;
  color: #ffffff;
}

.sidebar-container.menu-theme-dark .el-menu-item.is-active {
  background-color: #409eff;
  color: #ffffff;
}

.sidebar-container.menu-theme-dark .el-sub-menu__title {
  background-color: #1f1f1f;
  color: #e6e6e6;
}

.sidebar-container.menu-theme-dark .el-sub-menu__title:hover {
  background-color: #333;
  color: #ffffff;
}

/* 浅色菜单主题 */
.sidebar-container.menu-theme-light {
  background-color: #ffffff;
}

.sidebar-container.menu-theme-light .logo-container {
  background-color: #f5f7fa;
}

.sidebar-container.menu-theme-light .el-menu {
  background-color: #ffffff;
  border-right-color: #e4e7ed;
}

.sidebar-container.menu-theme-light .el-menu-item {
  background-color: #ffffff;
  color: #606266;
}

.sidebar-container.menu-theme-light .el-menu-item:hover {
  background-color: #f5f7fa;
  color: #409eff;
}

.sidebar-container.menu-theme-light .el-menu-item.is-active {
  background-color: #ecf5ff;
  color: #409eff;
}

.sidebar-container.menu-theme-light .el-sub-menu__title {
  background-color: #ffffff;
  color: #606266;
}

.sidebar-container.menu-theme-light .el-sub-menu__title:hover {
  background-color: #f5f7fa;
  color: #409eff;
}

/* 深色主题下的 Element Plus 组件适配 */
body.dark-theme .el-card {
  background-color: #2d2d2d;
  color: var(--text-color-regular);
  border-color: var(--border-color-base);
}

body.dark-theme .el-card__header {
  background-color: #3a3a3a;
  border-color: var(--border-color-base);
}

body.dark-theme .el-input__inner {
  background-color: #3a3a3a;
  border-color: var(--border-color-base);
  color: var(--text-color-regular);
}

body.dark-theme .el-input__inner:focus {
  border-color: var(--primary-color);
}

body.dark-theme .el-button {
  background-color: #3a3a3a;
  border-color: var(--border-color-base);
  color: var(--text-color-regular);
}

body.dark-theme .el-button--primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

body.dark-theme .el-tabs__item {
  color: var(--text-color-secondary);
}

body.dark-theme .el-tabs__item.is-active {
  color: var(--primary-color);
}

body.dark-theme .el-table {
  background-color: #2d2d2d;
  color: var(--text-color-regular);
}

body.dark-theme .el-table th {
  background-color: #3a3a3a;
}

body.dark-theme .el-table td {
  border-color: var(--border-color-base);
}

body.dark-theme .el-table__header th {
  background-color: #3a3a3a;
  color: var(--text-color-regular);
}

body.dark-theme .el-table__body td {
  background-color: #2d2d2d;
  color: var(--text-color-regular);
}

body.dark-theme .el-pagination {
  background-color: transparent;
  color: var(--text-color-regular);
}

body.dark-theme .el-pagination .btn-next,
body.dark-theme .el-pagination .btn-prev {
  background-color: #3a3a3a;
  color: var(--text-color-regular);
}

body.dark-theme .el-pagination .el-pager li {
  background-color: #3a3a3a;
  color: var(--text-color-regular);
}

body.dark-theme .el-pagination .el-pager li.active {
  background-color: var(--primary-color);
  color: white;
}

/* 浅色主题下的 Element Plus 组件适配 */
body.light-theme .el-card {
  background-color: #ffffff;
  color: var(--text-color-regular);
  border-color: var(--border-color-base);
}

body.light-theme .el-card__header {
  background-color: #f5f7fa;
  border-color: var(--border-color-base);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb {
  background-color: #555;
}

body.dark-theme ::-webkit-scrollbar-track {
  background-color: #2d2d2d;
}